package com.choosefine.paycenter.webgateway.pay.web.controller;

import com.choosefine.paycenter.channel.abc.api.impl.ABCQueryOderServiceImpl;
import com.choosefine.paycenter.common.dto.JSONResult;
import com.choosefine.paycenter.common.utils.JSONResultGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 潘钱钦（qianqinpan@outlook.com）
 * @create 2017-04-27 14:15
 **/
@Slf4j
@RestController
@RequestMapping("abcqueryoder")
public class ABCQueryOderController {
    @Autowired
    private ABCQueryOderServiceImpl abcQueryOderService;

    @GetMapping("/{payTypeID}/{queryTpye}/{OrderNo}")
    public JSONResult abcQueryOder(@PathVariable String payTypeID, @PathVariable String queryTpye, @PathVariable String OrderNo ){
        Map resultMap=abcQueryOderService.queryOder(payTypeID,queryTpye,OrderNo);
        return JSONResultGenerator.buildOperSuccessResult(resultMap);
    }
}
